﻿using MySqlConnector;

namespace Front._1124;

public partial class Login : Form

{
    public Login()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
        using var connection = new MySqlConnection("Server=myserver;User ID=mylogin;Password=mypass;Database=mydatabase");
        connection.Open();

        using var command = new MySqlCommand("SELECT field FROM admin_info;", connection);
        using var reader = command.ExecuteReader();
        while (reader.Read())
            Console.WriteLine(reader.GetString(0));

    }
}